#pragma once

#include "AdaptationMap.h"
#include "AdaptationType.h"
#include "../Core/Singleton.h"
#include "../Utility/Point.h"

enum AirspaceBaseVolumeTypes
{
	AirspaceBaseVolumeType_Circle,
	AirspaceBaseVolumeType_Polygon
};

class AirspaceBaseVolume : public AdaptationType
{
public:
	std::string Name;
	AirspaceBaseVolumeTypes Type;
	float Lower;
	float Upper;
	//Circle
	Point Center;
	float Radius;
	float DegStart;
	float DegEnd;
	//Polygon
	std::vector<Point> Points;

	void ParseDictionary(Dictionary p_Dictionary);
	std::string Key();
	bool IsInclude(Point p_Point);
};

class AirspaceBaseVolumeMap : public AdaptationMap<AirspaceBaseVolume>, public Singleton<AirspaceBaseVolumeMap>
{
	friend class Singleton<AirspaceBaseVolumeMap>;

private:
	AirspaceBaseVolumeMap();
	
public:
	std::list<AirspaceBaseVolume*> GetAirspaceBaseVolume(Point p_Point);
};
